package com.some;

import java.util.Scanner;
import java.util.function.Function;

public class HuaWei_01 {
    public int getNumLen(double total, int charNum) {
        if (total <= 26) {
            return 1;
        }
        int del = 1;
        for (int i = 0; i < charNum; i++) {
            del *= 26;
        }
        int num = 1;
        del *= 10;
        while (del < total) {
            total /= 10;
            num++;
        }
        return num;
    }

    public static void main(String[] args) {
        HuaWei_01 huaWei_01 = new HuaWei_01();
        Scanner sc = new Scanner(System.in);
        double X = sc.nextDouble();
        int Y = sc.nextInt();
        System.out.println(huaWei_01.getNumLen(X, Y));
    }
/*    function getNumLen(total, charNum) {
        if (total <= 26) {
            return 1;
        }
        let del = 1;
        for (let i = 0; i < charNum; i++) {
            del *= 26;
        }
        let num = 1;
        del *= 10;
        while (del < total) {
            del *= 10;
            num++;
        }
        return num;
    }*/
}

